<#-- @ftlvariable name="jiguans" type="java.util.List<nxu.it.Jiguan>" -->
<#-- @ftlvariable name="genders" type="java.util.List<nxu.it.Gender>" -->
<!DOCTYPE html>
<head>
    <meta charset="UTF-8" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1786038_m62pqneyrzf.css">
    <title>数据注册页面</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html {
            height: 100%;
        }

        body {
            height: 100%;
            font-family: JetBrains Mono Medium;
            display: flex;
            align-items: center;
            justify-content: center;
            /* background-color: #0e92b3; */
            background: url('img/city.png') no-repeat;
            background-size: 100% 100%;
        }

        .form-wrapper {
            width: 500px;
            background-color: rgba(41, 45, 62, .8);
            color: #fff;
            border-radius: 2px;
            padding: 50px;
        }

        .form-wrapper .header {
            text-align: center;
            font-size: 35px;
            text-transform: uppercase;
            line-height: 100px;
        }

        .form-wrapper .input-wrapper input {
            background-color: rgb(41, 45, 62);
            border: 0;
            width: 100%;
            text-align: center;
            font-size: 15px;
            color: #fff;
            outline: none;
        }

        .form-wrapper .input-wrapper input::placeholder {
            text-transform: uppercase;
        }

        .form-wrapper .input-wrapper .border-wrapper {
            background-image: linear-gradient(to right, #e8198b, #0eb4dd);
            width: 100%;
            height: 50px;
            margin-bottom: 20px;
            border-radius: 30px;
            display: flex;
            align-items: center;
            justify-content: center;

        }

        .form-wrapper .input-wrapper .select {
            background-image: linear-gradient(to right, #e8198b, #0eb4dd);
            display: flex;
            width: 100%;
            height: 50px;
            margin-bottom: 20px;
            align-items: center;
            text-align: center; text-align-last: center;
            color: #082567;
           /* border: 1px solid #aaa;*/
            text-shadow: none;
            border-radius: 30px;
            /*transition: box-shadow 0.25s ease;*/
            justify-content: center;

        }

        .form-wrapper .input-wrapper .border-wrapper .border-item {
            height: calc(100% - 4px);
            width: calc(100% - 4px);
            border-radius: 30px;
        }

        .form-wrapper .input-wrapper .gcs-radio {

            display: none;
        }

        .gcs-radio+label {
            width: 20px;
            height: 20px;
            line-height: 20px;
            display: inline-block;
            text-align: center;
            vertical-align: bottom;
            border: 1px solid gray;
            border-radius: 50%;
        }

        .gcs-radio+label:hover {
            border: 1px solid #2783FB;
            cursor: pointer;
        }

        .gcs-radio:checked+label {
            background: #2783FB;
            border: 0px solid #2783FB;

        }

        .gcs-radio:checked+label:after {
            content: "\2022";
            font-size: 0px;
            color: white;

        }



        .form-wrapper .action {
            display: flex;
            justify-content: center;
        }

        .form-wrapper .action .btn {
            width: 60%;
            text-transform: uppercase;
            border: 2px solid #0e92b3;
            text-align: center;
            line-height: 50px;
            border-radius: 30px;
            cursor: pointer;
        }

        .form-wrapper .action .btn:hover {
            background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
        }

        .form-wrapper .icon-wrapper {
            text-align: center;
            width: 60%;
            margin: 0 auto;
            margin-top: 20px;
            border-top: 1px dashed rgb(146, 146, 146);
            padding: 20px;
        }

        .form-wrapper .icon-wrapper i {
            font-size: 20px;
            color: rgb(187, 187, 187);
            cursor: pointer;
            border: 1px solid #fff;
            padding: 5px;
            border-radius: 20px;
        }

        .form-wrapper .icon-wrapper i:hover {
            background-color: #0e92b3;
        }
        .gcs-checkbox {
            vertical-align: middle;
            display: none;

        }

        .gcs-checkbox+label {

            background-color: white;

            border-radius: 0px;

            border: 1px solid #d3d3d3;

            width: 20px;

            height: 20px;

            display: inline-block;

            text-align: center;

            vertical-align: bottom;

            line-height: 20px;

        }

        .gcs-checkbox+label:hover {

            cursor: pointer;

            border: 1px solid #2783FB;

        }

        .gcs-checkbox:checked+label {

            background-color: #eee;

            background: #2783FB;

        }

        .gcs-checkbox:checked+label:after {

            content: "\2714";

            color: white;

        }

    </style>
</head>
<body>
<div class="form-wrapper">
<div class="header">
    Register
</div>
<div class="input-wrapper">
    <form id="webDataForm" name="webDataForm" method="post" action="/doRegister">
    <div class="border-wrapper">
        <input type="text" name="username" placeholder="username" class="border-item" autocomplete="off">
    </div>
    <div class="border-wrapper">
        <input type="password" name="password" placeholder="password" class="border-item" autocomplete="off">
    </div>
    <div class="border-wrapper">
        <input type="age" name="age" placeholder="age" class="border-item" autocomplete="off">
    </div>
        <h2>Choose your Gender</h2>
    <div >
          <#-- <i class="calendar icon"></i>-->
        男<input type="radio" name="sex" class="gcs-radio" id="男" />
        <label for="男"></label>
        女<input type="radio" name="sex" class="gcs-radio" id="女" />
        <label for="女"></label>
    </div>
        <br>
    <div class="border-wrapper">
        <input type="email" name="email" placeholder="email" class="border-item" autocomplete="off">
    </div>
    <div  >
        <select class="select" title="Choose your origin">
            <option disabled selected value>- Choose your origin</option>
            <#list jiguans as jiguan>
                <option>
                    ${jiguan.province}
                </option>
            </#list>
        </select>
    </div>
        <h2>Choose your habit</h2>
    <div >
        <input type="checkbox" id="habit1"  class="gcs-checkbox" name="habits"  > ${habit1}
        <label for="habit1" style="margin-left:6px;" ></label>
        <input type="checkbox" id="habit2" class="gcs-checkbox" name="habits"  > ${habit2}
        <label for="habit2" style="margin-left:6px;"></label>
        <input type="checkbox" id="habit3" class="gcs-checkbox" name="habits" > ${habit3}
        <label for="habit3" style="margin-left:6px;"></label>
        <input type="checkbox"  id="habit4" class="gcs-checkbox" name="habits"> ${habit4}
        <label for="habit4" style="margin-left:6px;"></label>
        <input type="checkbox"  id="habit5" class="gcs-checkbox" name="habits"> ${habit5}
        <label for="habit5" style="margin-left:6px;"></label>
        <input type="checkbox"  id="habit6" class="gcs-checkbox" name="habits"> ${habit6}
        <label for="habit6" style="margin-left:6px;"></label>
        <br>
        <br>
    </div>

        <div class="action">
            <div class="btn">register</div>
        </div>
</form>
</div>
</div>
<#--<div class="action">
    <div class="btn">login</div>
</div>

<div class="m-container m-padded-tb-big doubling">

    <div class="ui container doubling">
        <div class="ui row">
            <div class="seven wide column doubling">
                <div class="ui top attached segment">
                    <div class="ui header">注册数据</div>
                </div>
                <div class="ui attached segment ">
                    <form id="webDataForm" name="webDataForm" method="post" action="/doRegister">
                        <div class="ui labeled left icon input" style="width: 100%">
                            <i class="computer icon"></i>
                            <input  type="text" name="userName" >
                            <a class="ui tag label">
                                用户名
                            </a>
                        </div>
                        <br>
                        <br>
                        <div class="ui labeled left icon input" style="width: 100%">
                            <i class="briefcase icon"></i>
                            <input type="text" name="password" >
                            <a class="ui tag label">
                                密码
                            </a>
                        </div>
                        <br>
                        <br>
                        <div class="ui labeled left icon input" style="width: 100%">
                            <i class="eyedropper icon"></i>
                            <input type="text" name="age">
                            <a class="ui tag label">
                                年龄
                            </a>
                        </div>
                        <br>
                        <br>
                        <div class="ui labeled left icon input" style="width: 100%">
                            <i class="calendar icon"></i>
                            <input  name="email">
                            <a class="ui tag label">
                                邮箱
                            </a>
                        </div>
                        <br>
                        <br>

                        <div class="ui labeled left icon input" style="width: 100%" >
                            <div style="width: 100%;align:center">
                            <i class="calendar icon"></i>
                            <input type="radio" name="sex" checked="checked" >男
                            <input type="radio" name="sex" >女
                            </div>
                            <a class="ui tag label" >
                                性别
                            </a>
                        </div>
                        <br>
                        <br>

                        <div class="ui labeled left icon input" style="width: 100%">
                            <i class="calendar icon"></i>
                            <div style="width: 100%;align:center">
                            <select>
                                <#list jiguans as jiguan>
                                    <option>
                                        ${jiguan_index+1}:${jiguan.province}
                                    </option>
                                </#list>
                            </select>
                            </div>
                            <a class="ui tag label">
                                籍贯
                            </a>
                        </div>
                        <br>
                        <br>

                        <div class="ui labeled left icon input" style="width: 100%">
                            <i class="calendar icon"></i>
                            <div style="width:100%">
                                <input type="checkbox" name="habits" checked> ${habit1}
                                <input type="checkbox" name="habits" checked> ${habit2}
                                <input type="checkbox" name="habits" checked> ${habit3}
                                <input type="checkbox" name="habits" checked> ${habit4}
                                <input type="checkbox" name="habits" checked> ${habit5}
                                <input type="checkbox" name="habits" checked> ${habit6}
                            </div>
                            <a class="ui tag label">
                                爱好
                            </a>
                        </div>
                        <br>
                        <br>

                        <div class="ui padded grid">
                            <div class="white row">
                                <div class="column">
                                    <h2 class="ui header">注意</h2>
                                    <p>注册账号需保证每一项都不为空</p>
                                </div>
                            </div>
                            <div class="two column row">
                                <div class="white column">
                                    <button class="fluid ui teal button" type="submit">点击提交数据</button>
                                </div>
                                <div class="two column column">
                                    <button class="fluid ui teal button" onclick="updateWebData()">点击提交备注</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    function updateWebData() {

        for(var i=0; i<document.webDataForm.elements.length - 2; i++)
        {
            if(document.webDataForm.elements[i].value=="")
            {
                console.log(i);
                alert("当前表单不能有空项");
                document.webDataForm.elements[i].focus();
                return;
            }
        }

        document.webDataForm.action = "/updateWebData";
        document.webDataForm.submit();
    }
</script>-->

</body>
</html>